<?php

namespace app\shop\controller;

use think\Controller;
use buildView\Detail;
use buildView\Form;
use buildView\Grid;
use app\shop\model\ShopGoodsTag;

/**
 * 商品标签
 * Class Tags
 * @package app\shop\controller
 */
class Tags extends Controller
{
    /**
     * 列表
     * @auth true
     * @menu true
     * @return string
     */
    public function index()
    {
        $grid = new Grid(new ShopGoodsTag);
		$grid->name('商品标签');
        $grid->hideExportButton();
        $grid->actions(function ($action){
            $action->hideDetail();
        });
        $grid->setFromOpen();
        return $grid->view();
    }

    /**
     * 添加/编辑
     * @auth true
     * @menu true
     * @return string
     */
    public function form()
    {
        $form = new Form(new ShopGoodsTag);
		$form->text('name','商品标签名称');

        return $form->view();
    }
}
